//
//  CSGXDailySettingView.m
//  CarSalesMS_GCX
//
//  Created by Ssky on 2016/12/20.
//  Copyright © 2016年 Tony. All rights reserved.
//

#import "CSGXDailySettingView.h"

@implementation CSGXDailySettingView










#pragma mark - setupUI
- (void)setupUI {
    //
    UISegmentedControl *cSegment = [[UISegmentedControl alloc] initWithItems:@[@"简单", @"精简", @"详细"]];
    [self addSubview:cSegment];
    
    cSegment.selectedSegmentIndex = 1;
    
    [cSegment mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).mas_offset(20);
        make.leading.equalTo(self.mas_centerX).mas_offset(-10);
        make.size.mas_offset(CGSizeMake(180, 35));
    }];

    //
    UILabel *lblMode = [UILabel gx_labelWithText:@"现金日报打印模式" fontSize:15 color:[UIColor blackColor]];
    [self addSubview:lblMode];
    
    [lblMode mas_makeConstraints:^(MASConstraintMaker *make) {
        make.trailing.equalTo(self.mas_centerX).offset(-25);
        make.centerY.equalTo(cSegment).mas_offset(0);
    }];
    
    UIView *vLine = [[UIView alloc] init];
    [self addSubview:vLine];
    
    vLine.backgroundColor = [UIColor gx_colorWithRed:200 green:200 blue:200];
    
    [vLine mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(cSegment.mas_bottom).mas_offset(20);
        make.leading.trailing.equalTo(self).mas_offset(0);
        make.height.offset(0.8);
    }];
    
    UILabel *lblNote = [UILabel gx_labelWithText:@"现金日报打印模式分为精简模式、简单模式、详细模式。简单模式只打印最后的销售金额汇总，精简模式打印客户端销售金额汇总及现金明细，包含销售金额和上交款等。详细模式将客户的现金明细一同打印。" fontSize:12 color:[UIColor grayColor]];
    [self addSubview:lblNote];
    
    [lblNote mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(vLine.mas_bottom).mas_offset(6);
        make.leading.equalTo(self).mas_offset(10);
        make.trailing.equalTo(self).mas_offset(-10);
    }];


}












@end
